#include<bits/stdc++.h>
using namespace std;

int main()
{
    int left = 0;
    int a[100]={0};
    int right = 100;
    int mid = (left + right)/2;
    int del;
    for(int i = 0;i <100;i++)
    {
        a[i] = i;
    }
    scanf("%d",&del);
    while(left+1<=right)
    {
        if(del>a[mid])
        {
            left = mid+1;
            mid = (left + right)/2;
            for(int j = left;j<=right;j++)
            {
                printf("%d ",a[j]);
            }
            printf("\n");
        }
        else if(del<a[mid])
        {
            right = mid-1;
            mid = (left+right)/2;
            for(int i = left;i<=right;i++)
            {
                printf("%d ",a[i]);
            }
            printf("\n");
        }
        else if(del==a[mid])
        {
            printf("%d ",a[mid]);
            break;
        }
        else if(left==mid||right==mid)
        {
            printf("%d \n",a[mid]);
        }
    }
}